home *** CD-ROM | disk | FTP | other *** search
/ Aminet 3 / Aminet 3 - July 1994.iso / Aminet / util / misc / aterminfo.lha / curses.priv.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-18  |  2.8 KB  |  89 lines

  1.  
  2. /* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for   *
  3. *  details. If they are missing then this copy is in violation of    *
  4. *  the copyright conditions.                                        */
  5.  
  6. /*
  7.  *    curses.priv.h
  8.  *
  9.  *    Header file for curses library objects which are private to
  10.  *    the library.
  11.  *
  12.  */
  13.  
  14. #ifndef AMIGA
  15.  
  16. #include "curses.h"
  17.  
  18. #define min(a,b)    ((a) > (b)  ?  (b)  :  (a))
  19. #define max(a,b)    ((a) < (b)  ?  (b)  :  (a))
  20.  
  21. #define CHANGED     -1
  22.  
  23. WINDOW    *newscr;
  24.  
  25. extern int _tracing;
  26. extern int _outc(char);
  27.  
  28. struct try {
  29.         struct try      *child;     /* ptr to child.  NULL if none          */
  30.         struct try      *sibling;   /* ptr to sibling.  NULL if none        */
  31.         char            ch;         /* character at this node               */
  32.         short           value;      /* code of string so far.  NULL if none */
  33. };
  34.  
  35. /*
  36.  * Structure for soft labels.
  37.  */
  38.  
  39. typedef struct {
  40.     char dirty;            /* all labels have changed */
  41.     char hidden;            /* soft lables are hidden */
  42.     WINDOW *win;
  43.      struct slk_ent {
  44.          char text[9];        /* text for the label */
  45.          char form_text[9];        /* formatted text (left/center/...) */
  46.          int x;            /* x coordinate of this field */
  47.          char dirty;            /* this label has changed */
  48.          char visible;        /* field is visible */
  49.     } ent[8];
  50. } SLK;
  51.  
  52. struct screen
  53. {
  54.        FILE        *_ifp;        /* input file ptr for this terminal     */
  55.        FILE        *_ofp;        /* output file ptr for this terminal    */
  56.     struct term    *_term;        /* used by terminfo stuff               */
  57.     WINDOW        *_curscr;   /* windows specific to a given terminal */
  58.     WINDOW        *_newscr;
  59.     struct try  *_keytry;   /* "Try" for use with keypad mode       */
  60.     char        _backbuf[10]; /* Buffer for pushed back characters  */
  61.     int         _backcnt;   /* How many characters in _backbuf?     */
  62.     int         _cursrow;   /* Row and column of physical cursor    */
  63.     int         _curscol;
  64.     bool        _nl;        /* True if terminal has CRMOD bit on    */
  65.     bool        _raw;        /* True if in raw mode                  */
  66.     int            _cbreak;    /* 1 if in cbreak mode                  */
  67.                             /* 2 if in halfdelay mode                */
  68.     bool        _echo;        /* True if echo on                      */
  69.     bool        _nlmapping; /* True if terminal is really doing     */
  70.                     /* NL mapping (fn of raw and nl)        */
  71.      SLK        *_slk;        /* ptr to soft key struct / NULL        */
  72.     int        _costs[9];  /* costs of cursor movements for mvcur  */
  73.     int        _costinit;  /* flag wether costs[] is initialized   */
  74. };
  75.  
  76. struct screen    *SP;
  77.  
  78. int _slk_format;        /* format specified in slk_init() */
  79. void (*_slk_initialize)(void);    /* ptr to soft key init function */
  80.                 /* We use a pointer to avoid linking
  81.                    of the soft label routines, when
  82.                    no soft labels are used */
  83.  
  84.  
  85. #define MAXCOLUMNS    135
  86. #define MAXLINES      66
  87. #define UNINITIALISED ((struct try * ) -1)
  88.  
  89. #endif